package com.zsp.comic.dao;

import com.zsp.comic.entity.User;
import org.apache.ibatis.annotations.Mapper;

import java.util.Date;

/**
 * @author gan
 * @create 2020-11-30 10:57
 */
@Mapper
public interface UserDao {

    User getUserByUsernameAndPassword(String username,String password);

    User getUserByUsername(String username);

    String getUserAuthorityById(Integer id);

    Integer addUser(User user);

    Integer addUserAuthority(Integer userId);

    Integer getUserCollectNumByUserIdAndComicId(Integer userId, Integer comicId);

    Integer addUserCollect(Integer userId, Integer comicId);

    Integer deleteUserCollect(Integer userId, Integer comicId);

    Integer updateUser(User user);

}
